package no.monsen.webservice;

public class MonsenServicePortTypeProxy implements no.monsen.webservice.MonsenServicePortType {
  private String _endpoint = null;
  private no.monsen.webservice.MonsenServicePortType monsenServicePortType = null;
  
  public MonsenServicePortTypeProxy() {
    _initMonsenServicePortTypeProxy();
  }
  
  public MonsenServicePortTypeProxy(String endpoint) {
    _endpoint = endpoint;
    _initMonsenServicePortTypeProxy();
  }
  
  private void _initMonsenServicePortTypeProxy() {
    try {
      monsenServicePortType = (new no.monsen.webservice.MonsenServiceLocator()).getMonsenServiceSOAP11port_http();
      if (monsenServicePortType != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)monsenServicePortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)monsenServicePortType)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (monsenServicePortType != null)
      ((javax.xml.rpc.Stub)monsenServicePortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public no.monsen.webservice.MonsenServicePortType getMonsenServicePortType() {
    if (monsenServicePortType == null)
      _initMonsenServicePortTypeProxy();
    return monsenServicePortType;
  }
  
  public java.lang.String isUpdateAvailable(java.lang.String version) throws java.rmi.RemoteException{
    if (monsenServicePortType == null)
      _initMonsenServicePortTypeProxy();
    return monsenServicePortType.isUpdateAvailable(version);
  }
  
  public no.monsen.webservice.commons.xsd.MonsenFact getMonsenFact(no.monsen.webservice.commons.xsd.MonsenFact request) throws java.rmi.RemoteException{
    if (monsenServicePortType == null)
      _initMonsenServicePortTypeProxy();
    return monsenServicePortType.getMonsenFact(request);
  }
  
  
}